
#include "xparameters.h"
#include "xplatform_info.h"
#include "xuartps.h"
#include "stdarg.h"
#include "stdlib.h"
#include "stdio.h"
#include "math.h"

#define 	UART_DEVICE_ID			XPAR_XUARTPS_0_DEVICE_ID
#define		UART_BAUDRATE			XUARTPS_DFT_BAUDRATE   //115200
#define		UART_DATA_BITS			XUARTPS_FORMAT_8_BITS
#define		UART_PARITY_BIT			XUARTPS_FORMAT_NO_PARITY
#define		UART_STOP_BIT			XUARTPS_FORMAT_1_STOP_BIT

XUartPs 	UartPs;
/******************************************************************************/
int  UartPsInitial(XUartPs *UartInstPtr,u16 DeviceId);

void uart_recv_string(char* string);

void uart_send_string(char* string);

int  uartps_echo(char *data_buffer);

int  char_to_hex(char *char_buffer, unsigned int *hex_buffer, u8 size_buf, u8 hex_len);

int  hex_to_char(char *char_buffer, u8 *hex_buffer, u8 byte_len, u8 hex_len);

void hex_group(unsigned int *data_buffer, unsigned int *hex_buffer, u8 size_buf, u8 hex_len);

void hex_ungroup(unsigned int *data_buffer,u8 *hex_buffer,  u8 byte_len, u8 hex_len);

